#ifndef RECBOX_H
#define RECBOX_H

#include <QWidget>
#include<QJsonArray>
#include <QJsonObject>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include<musiclist.h>



namespace Ui {
class RecBox;
}

class RecBox : public QWidget
{
    Q_OBJECT

public:
    explicit RecBox(QWidget *parent = nullptr);
    ~RecBox();

    void initRecBoxUi(QJsonArray date,int row);

private slots:
    void on_btDown_clicked();

    void on_btUp_clicked();

private:
    void createRecBoxItem();

private:
    Ui::RecBox *ui;
    int row;
    int col;

    int currentIndex;
    int count;

    QJsonArray imageList;
    QNetworkAccessManager *manager = nullptr;

signals:
    void netMusicListready(MusicList,QString);

private slots:
    void onMusicListItemReady(const MusicList &netList, const QString &listName);

};

#endif // RECBOX_H
